//
//  UIButton+ColorandText.m
//  宜居HD
//
//  Created by 张金国 on 16/4/26.
//  Copyright © 2016年 张金国. All rights reserved.
//

#import "UIButton+ColorandText.h"

@implementation UIButton (ColorandText)

+ (UIButton *)buttonWithBackgroundColor:(UIColor *)backgroundColor textFont:(UIFont *)textFont textColor:(UIColor *)textColor title:(NSString *)title cornerRadius:(CGFloat)cornerRadius {
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTintColor:textColor];
    button.backgroundColor = backgroundColor;
    button.titleLabel.textColor = textColor;
    button.layer.masksToBounds = YES;
    button.layer.cornerRadius = cornerRadius;
    return button;
}

@end
